package com.neo.web.controller.pub;

import com.neo.common.annotation.Log;
import com.neo.common.core.controller.BaseController;
import com.neo.common.core.domain.AjaxResult;
import com.neo.common.core.page.TableDataInfo;
import com.neo.common.enums.BusinessType;
import com.neo.pub.domain.Patient;
import com.neo.pub.domain.Schedule;
import com.neo.pub.service.IPatientService;
import com.neo.pub.service.IScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户信息
 * 
 * @author tr
 */
@Controller
@RequestMapping("/pub/schedule")
public class ScheduleController extends BaseController
{
    private String prefix = "pub/schedule";

    @Autowired
    private IScheduleService iScheduleService;


//    @RequiresPermissions("system:user:view")
    @GetMapping()
    public String index()
    {
        return prefix + "/schedule";
    }

//    @RequiresPermissions("system:user:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(Schedule schedule)
    {
        startPage();
        List<Schedule> list = iScheduleService.selectSchedules(schedule);
        return getDataTable(list);
    }

}